Skip to content

feat: bookmarks events handler partial recovery#793

Merged
aintnostressin merged 4 commits intomainfrom
feat/bookmark-handler-fix-state
Apr 10, 2026
Merged

feat: bookmarks events handler partial recovery#793
aintnostressin merged 4 commits intomainfrom
feat/bookmark-handler-fix-state

Conversation

@aintnostressin
Copy link
Copy Markdown
Contributor

Prepares bookmark handlers for partial recovery.

  • Reorders sync_del to read the bookmark target from the graph before deleting the edge, ensuring data survives for retries if Redis ops fail (graph-last pattern)
  • Guards counter decrement behind a Redis index existence check, preventing double-decrement on retry
  • Adds get_bookmark_target graph query and Bookmark::get_target_from_graph to read without side effects

@aintnostressin aintnostressin requested review from ok300 and tipogi April 3, 2026 16:30
@aintnostressin aintnostressin changed the title feat: fix bookmarks partial recovery feat: bookmarks partial recovery Apr 3, 2026
@aintnostressin aintnostressin changed the title feat: bookmarks partial recovery feat: bookmarks events handler partial recovery Apr 3, 2026
Comment thread nexus-watcher/src/events/handlers/bookmark.rs Outdated
Comment thread nexus-watcher/src/events/handlers/bookmark.rs
Comment thread nexus-watcher/tests/event_processor/bookmarks/del_idempotent.rs Outdated
@aintnostressin aintnostressin requested a review from ok300 April 7, 2026 10:09
@aintnostressin aintnostressin added 🪡 chores Maintenance and housekeeping 👀 watcher Nexus indexer related operations labels Apr 8, 2026
@aintnostressin aintnostressin self-assigned this Apr 8, 2026
@aintnostressin aintnostressin added this to the 2026-Q1 milestone Apr 8, 2026
// 1. Read target from graph WITHOUT deleting the edge
let (post_id, author_id) = Bookmark::get_target_from_graph(&user_id, &bookmark_id)
.await?
.ok_or(EventProcessorError::SkipIndexing)?;
Copy link
Copy Markdown
Collaborator

@tipogi tipogi Apr 8, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I guess with that error type, we might be careful because in the actual impl. RetryManager will ingest again. Maybe you are planing something for the future RetryManager

@aintnostressin aintnostressin merged commit 4163ffb into main Apr 10, 2026
3 checks passed
@aintnostressin aintnostressin deleted the feat/bookmark-handler-fix-state branch April 10, 2026 09:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

🪡 chores Maintenance and housekeeping 👀 watcher Nexus indexer related operations

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants